It may be desirable to gather data relating to the operation of a data processing system whilst it carries out its data processing operations, for example by counting certain events which may take place as a result of those data processing operations, such as cache misses, and periodically to inspect a counter value in order to correlate the count with program execution in order to better understand the relationship between executed software and system performance. This periodic inspection of a counter value may for example be carried out by taking an interrupt at intervals, or taking an interrupt after a predetermined number of events have occurred, and then reading the counter value.